<?php

namespace App\Api;


use App\Http\Controllers\Controller;
use App\Models\System;
use Illuminate\Http\Request;

class SystemController extends Controller
{

    public function show()
    {
        return System::find(1);
    }

    public function store(Request $request)
    {
        System::updateOrcreate(['id' => 1], [
            'name' => $request->name,
            'recodeNo' => $request->recodeNo,
            'logo' => $request->logo,
            'mobile' => $request->mobile,
            'workingDay' => $request->workingDay,
            'address' => $request->address,
            'introduce' => $request->introduce,
            'email' => $request->email,
            'wechat' => $request->wechat,
            'website' => $request->website,
            'qq' => $request->qq,
        ]);
        return $this->message('系统配置修改成功');
    }
}
